import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { JPush } from '@jiguang-ionic/jpush';
//import { TabsPage } from '../pages/tabs/tabs';
import { LoginPage } from '../pages/login/login';
@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  rootPage:any = LoginPage;

  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,private jp : JPush) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      this.jp.init().then(res=>{console.log(res);
      this.jp.getConnectionState().then(rrr=>{console.log(rrr)});
      this.jp.getRegistrationID().then(re=>{console.log(re)});
      this.jp.setDebugMode(true);
       }).catch(e=>{console.log(e)});
       
      statusBar.styleDefault();
      splashScreen.hide();
    });
  }
}
